package com.cnhis.cloudhealth.clinical.util;

import java.util.HashMap;
import java.util.concurrent.ConcurrentMap;

import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.RegistryConfig;
 
 
//import com.attilax.util.Callback;
import com.cnhis.cloudhealth.clinical.clidoctor.acolsetting.service.IcolSetting;
import com.google.common.collect.Maps;
import com.alibaba.dubbo.config.ConsumerConfig;
import com.alibaba.dubbo.config.ReferenceConfig;//
//import com.xxx.XxxService;
//gbk 锟斤拷锟斤拷
 
/*
 * worklog s44
 * 张清华关于临时表清理资源收集gc
 * 
 * 
 * */
 

//@gbk锟斤拷锟斤拷
public class Custom_testColSetting {
	public static void main(String[] args) {
		System.out.println("--66");
		// 锟斤拷前应锟斤拷锟斤拷锟斤拷
		ApplicationConfig application = new ApplicationConfig();
		application.setName("clinical");

		// 锟斤拷锟斤拷注锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
		RegistryConfig registry = new RegistryConfig();

		String addurl = "multicast://224.5.6.7:1234";
		addurl = "zookeeper://192.168.1.17:2182";
		addurl="N/A";// reg center is n/a
		addurl="127.0.0.1:20880";
		registry.setAddress(addurl);
	 	registry.setProtocol("dubbo");
	//	registry.setUsername("aaa");
	//	registry.setPassword("bbb");

		// 注锟解：ReferenceConfig为锟截讹拷锟斤拷锟节诧拷锟斤拷装锟斤拷锟斤拷注锟斤拷锟斤拷锟侥碉拷锟斤拷锟接ｏ拷锟皆硷拷锟斤拷锟斤拷锟斤拷峁╋拷锟斤拷锟斤拷锟斤拷锟�

 

		// 锟斤拷锟斤拷远锟教凤拷锟斤拷
		ReferenceConfig  ReferenceConfig1_OperLogUtilInterface = new ReferenceConfig (); // 锟斤拷实锟斤拷锟斤拷兀锟斤拷锟阶帮拷锟斤拷锟阶拷锟斤拷锟斤拷牡锟斤拷锟斤拷锟斤拷约锟斤拷锟斤拷峁╋拷叩锟斤拷锟斤拷樱锟斤拷锟斤拷锟斤拷谢锟斤拷妫拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诖锟斤拷锟斤拷锟斤拷泄漏
		ReferenceConfig1_OperLogUtilInterface.setApplication(application);
		ReferenceConfig1_OperLogUtilInterface.setRegistry(registry); // 锟斤拷锟阶拷锟斤拷锟斤拷目锟斤拷锟斤拷锟絪etRegistries()
		ReferenceConfig1_OperLogUtilInterface.setInterface(IcolSetting.class);
		// ReferenceConfig1_OperLogUtilInterface.setVersion("1.0.0");

		IcolSetting OperLogUtilInterface1 = (IcolSetting) ReferenceConfig1_OperLogUtilInterface.get();

		try {
			HashMap<String, Object> newConcurrentMap = new HashMap();
			newConcurrentMap.put("key", "key1");newConcurrentMap.put("val", "val1");
		Object o=	  OperLogUtilInterface1.getSetting(newConcurrentMap);
		System.out.println(o);
		} catch (Exception e) {
			System.out.println("    e msg"+e.getMessage());
		}
		
 
		//System.out.println(xxxService.sayHello("--test"));
	}
}
